@extends('default.mobile.layouts.personalPublic')
@section('title','项目经验-'.Site::get('webname'))
{{--首页css--}}
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/mobile/personal/common.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/mobile/jquery/select.css')}}">
@endsection
{{--头部标签--}}
@section('tag','项目经验')
@section('link') href="{{url('mobile/personal/resume_manage?parameter=project&resume_id='.$resumeProjectExp->resume_id)}}" @endsection

{{--主体内容--}}
@section('content')
    <div class="fill" id="fill" style="overflow: hidden">
        <div class="form_info" id="form_info">
            <form action="{{url('mobile/personal/edit_project_exp')}}"  onsubmit="return checkProject('#projectForm')"  method="post" id="projectForm" name="projectForm">
                {{csrf_field()}}
                <input type="hidden" name="resume_id" id="resume_id"  value="{{$resumeProjectExp->resume_id}}">
                <input type="hidden" name="id" id="id"  value="{{$resumeProjectExp->id}}">
                <dl>
                    <dt>项目名称<span class="asterisk">*</span></dt>
                    <dd><input type="text" name="project_name" id="project_name"  value="{{$resumeProjectExp->project_name}}" placeholder="请输入项目名称" autocomplete="off"></dd>
                </dl>
                <dl class="arrow" id="starttime_select">
                    <input type="hidden" name="starttime" value="{{$resumeProjectExp->starttime}}" id="starttime" />
                    <dt>开始时间<span class="asterisk">*</span></dt>
                    <dd><span class="select_text">请选择开始时间</span></dd>
                </dl>
                <dl class="arrow" id="endtime_select">
                    <input type="hidden" name="endtime" value="{{$resumeProjectExp->endtime}}" id="endtime" />
                    <dt>结束时间<span class="asterisk">*</span></dt>
                    <dd><span class="select_text">请选择结束时间</span></dd>
                </dl>
                <dl>
                    <dt>培训项目<span class="asterisk">*</span></dt>
                    <dd><input type="text" name="post" id="post"  value="{{$resumeProjectExp->post}}" placeholder="请输入培训项目" autocomplete="off"></dd>
                </dl>
                <dl class="arrow" id="project_description">
                    <dt>项目介绍</dt>
                    <dd>
                        <textarea name="content" id="content" style="display: none;">{{$resumeProjectExp->content}}</textarea>
                        <span class="select_text">@if(empty($resumeProjectExp->content))请输入项目介绍@else{{$resumeProjectExp->content}}@endif</span>
                    </dd>
                </dl>
                <div class="form_sub"><input type="submit" value="保存"></div>
            </form>
        </div>
    </div>
@endsection

@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/default/js/mobile/jquery/jquery.select_time.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/mobile/jquery/jquery.textarea.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/mobile/personal/resume_manage.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/mobile/jquery/zepto.scroll.js')}}"></script>

    <script>
        $(function(){
            var fill = $("#fill").find('#form_info');
            //开始时间
            fill.find("#starttime_select").select_time({
                select_title:'开始时间',
                hidden: '#starttime',
                select_con:'#select_start'
                //toDate:true
            });
            //结束时间
            fill.find("#endtime_select").select_time({
                select_title:'结束时间',
                hidden: '#endtime',
                select_con:'#select_end',
                toDate:true
            });
            //点击项目介绍
            fill.find("#project_description").textarea({
                text_title:'项目介绍',
                hidden: '#content'
            });
        });
        //错误信息提示
                @if(count($errors)>0)
                @if(is_object($errors))
        var msgErr='';
        @foreach($errors->all() as $error)
                msgErr += "<p style='line-height: .4rem; width: 100%'>{{$error}};</p>";
        @endforeach
        layerMsg(msgErr,2);
        @endif
        @endif
    </script>
@endsection